<?php 
        require_once('include/JobSeeker.class.php'); 
        require_once('include/OurDatabase.class.php');
        include("include/session.php");
        
        $JS = new JobSeeker();
	
		$DB = new OurDatabase();
	
		$DB->open_connection();

        
        if($session->logged_in){
		$seeker_id = $session->userinfo['seeker_id'];
			if(isset($_POST['fileid']) && isset($_POST['jobid'])){
				$success = $database->submitApplication($_POST['jobid'], $_POST['fileid'],$seeker_id);
				echo "Your application has been submitted.";
			}
			else {
				echo "Proper POST fields aren't set. Go back and try again.";
			}
		}
		else{
			echo "You aren't logged in. Go away.";
		}		
?>


